package com.ethink.platform.controller.mdm;

import com.ethink.framework.common.web.BaseController;
import com.ethink.framework.common.web.response.CommonResponse;
import com.ethink.mdm.api.AccountFacade;
import com.ethink.mdm.api.response.ReceivingAccountQueryResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author default
 * @version 1.0.0
 * @ClassName AccountController.java
 * @Description
 * @createTime 2022年12月19日 09:26:00
 */
@Tag(name = "AccountController", description = "收款账户 Controller")
@RestController
@Slf4j
@RequestMapping("platform-server/v1/mdm-service")
public class AccountController extends BaseController {

    @Autowired
    private AccountFacade accountFacade;

    @GetMapping("account/receiving")
    public CommonResponse<ReceivingAccountQueryResponse> queryBankAccount() {
        ReceivingAccountQueryResponse response = accountFacade.queryReceivingAccount();
        return succeedWith(response);
    }
}
